package cn.com.main;

import java.util.LinkedHashSet;
import java.util.Set;

public class RemoveDuplicates {
    public static void main(String[] args) {
        String[] numbers = ("V1_1_897__cloudboss_process.sql\n" +
                "V1_1_909__cloudboss_hpc_screen.sql\n" +
                "V1_1_922__cloudboss_hpcmerge.sql\n" +
                "V1_1_925__cloudboss_ai_modelarts.sql\n" +
                "V1_1_961__cloudboss_create_table.sql\n" +
                "V1_1_962__cloudboss_add_product_quota.sql\n" +
                "V1_1_981__cloudboss_insert_ccsp.sql\n" +
                "V1_1_984__cloudboss_add_analysis.sql\n" +
                "V1_1_987__cloudboss_insert_record_and_report.sql\n" +
                "V1_1_993__cloudboss_insert_newrole.sql\n" +
                "V1_1_995__cloudboss_merge_hpc.sql\n" +
                "V1_1_1033__cloudboss_modify_entity_name.sql\n" +
                "V1_1_1177__cloudboss_insert_template.sql\n" +
                "V1_1_1213__cloudboss_create_hpc_pass.sql\n" +
                "V1_1_1313__cloudboss_sys_add_aimarket.sql\n" +
                "V1_1_1528__cloudboss_mabms.sql\n" +
                "V1_1_1602__cloudboss_double_audit.sql\n" +
                "V1_1_1651__cloudboss_req391_2.sql.sql\n" +
                "V1_1_1725__cloudboss_init.sql").split("\n");

        Set<String> uniqueNumbers = new LinkedHashSet<>();
        for (String number : numbers) {
            uniqueNumbers.add(number.trim());
        }
        StringBuilder sb = new StringBuilder();
        for (String number : uniqueNumbers) {
            sb.append("'").append(number).append("'").append(",");
        }
        System.out.println("是否去重：" + (uniqueNumbers.size() == numbers.length));
        System.out.println(sb.toString());
    }
}